Method and apparatus for generating an electrical signal, representing a value of a function of an independent variable

ABSTRACT

A method of, and apparatus for, generating an electrical signal representing a value of a function of an independent variable. The method comprises the steps of generating an electrical signal, with a period T, representing the variations of the derivative df(x)/dx of the function f(x) within an interval xa x xb including the value x1, and deriving from said signal a pulseduration modulated signal consisting of pulses having a duration of AND A PULSE FREQUENCY OF 1/T, said pulses indicating the variations in the derivative df(x)/dx within the interval xa x x1, and deriving from said last-mentioned signal a DC voltage proportional to the mean value thereof and adding to this voltage a further DC voltage of a magnitude corresponding to any constant term, forming a part of the function f(x). Apparatus for carrying out the method is also disclosed.

United States Patent 1111 3,603,777

72 Inventor GunnarAxelKihlberg 1 3,217,148 11/1965 Robinson 235/197x Sollentuna,Sweden 3,358,129 12/1967 Schultz 235/197x 21 AppLNo. 812,756 3,435,196 3/]969 Schmid 235/197 122 Filed Apr.2, 1969 3,456,099 7/1969 Grindleetal 235/195 [45] Patented Sept.7, 197] 73 Assignee JungnerlnstrumentAktiebolaget Emmmkfiugene Stockholm Sweden Assistant Examiner loseph F Ruggiero 32 1 Priority p 25 1968 Attorney-Fred Philpitt [33] Sweden 1 5600/1968 ABSTRACT: A method of, and apparatus for, generating an electrical signalrepresenting a value of a function of an independent variable. The method comprises the steps of generating an electrical signal, with a period T, representing the varia- [54] :51: tions of the derivative dflx )ldx of the function f(x) within an VALUE OF A FUNCTION AN INDEPENDENT interval x sxgx mcludmg the valuex and derivingfrom said VARIABLE signal a pulse-duration modulated signal consisting of pulses 5 Claims 5 Drawing 8 having a duration of 52 us. 01 235/197, i"- 1 235/194 b a [5 Int. Cland a pulse frequency of ulses indicating the va -i of Search (ions in the derivative within the interval x sxsx and 265 deriving from said last-mentioned signal a DC voltage proportional to the mean value thereof and adding to this voltage a [56] v I Reerences Cited further DC voltage of a magnitude corresponding to any con- UNITED STATES PATENTS stant term, forming a part of the function f(x). Apparatus for 3,264,457 8/1966 Seegmiller et al. 235/197 X carrying out the method is also disclosed.

500"! I Sllltll S SIllCll k3 S Slllfll A S Sllll 5 SWITCH A-l SUN L I 5?. I 5?.

I 7 17PM PULSE 1 PULSE SOURCE 23 I. I

14''" sun 21 PATENTEIJYSEP 7:911

SHEET 1 OF 4 Exa PATENTED SEP 7 i971 SHEET 4 [IF 4 I Fig.4a

P Ln

Fig.4b

METHOD AND APPARATUSFOR GENERATING AN ELECTRICAL SIGNAL,.REPRESENTING A VALUE OF A FUNCTION OF AN INDEPENDENT VARIABLE The present invention relates to a method and apparatus for generating an electrical signal, representing a value of a function of an independent variable.

To provide such electrical representation of functional values it is previously known to generate a functional voltage varying periodically in correspondence with the function to be investigated, which in turn varies according. to'an independent variable, said functional voltage being periodically recorded or detected at times corresponding to the current value of the independent variable.

According to this prior method, however, difficulties have been encountered inattaining high accuracy in the reproduction of a certain value of thefunction. This isdue to the fact that detecting and storing of the instantaneous valueof a functional voltage can neitherbe carried out as fast as required, nor exactly at the right moment. Therefore, a result derived from prior methods could contain a considerable error.

The present invention has forits object to provide an improved solution of the problem-of generatingv an electrical signal representing a value f(x,) of a function f(x) of an independent variable x, corresponding to an arbitrary value x, of said independent variable. The method according to the invention is characterized by the steps of generating an electrical signal witha periodT, representing the variations in the derivative df(x)/dx of the function f(x) within an interval w gx sx including the value x,, and deriving from said signal a pulse-duration modulated signal consistingof'pulses having a duration of t and a pulse frequency of l/T, said pulses indicating the variations in the derivative df(x)ld.x within the interval lu gage and deriving from said last-mentioned signal a DC voltagepro portional to the mean'value thereof and adding to this voltage a further DC voltage of a magnitude corresponding to any constant term, formingpart of the function f(x).

The method of the presentinvention does not require a detectin g, at predetermined instants of the instantaneous magnitude of a functional voltage, but'is instead based on the steps of generating a DC voltage which is proportional to the sought functional value, by averaging asignal representing thederivative of the function and consisting of a'series of pulses occurring with high timeaccuracy. This enables very high accuracy of the electrical signal representing the functional value.

According to the. invention, the periodical voltage is preferably built up we sum of Legendre-polynoms, or derivatives of such polynoms, respectively. It may, however, be giventhe form of a stepped or sinusoidal function.

The invention also relatestto apparatus for carrying out the method disclosed hereinbefore. This apparatus substantially comprises:

a generator, adapted to generate a periodical electrical signal representative ofthe derivative of a certain functionf(x) within a selected interval 3t i i a gate circuit adapted to derive from said signal aperiodically pulse-duration modulated signal representative of the derivative df(x)/dx. within the interval. :z:, a:

. where x a: iM'TfiT an averagingcircuit emittingaDC voltage proportional to the meanvalue of the pulse duration'modulated signal;

an adding circuit for adding this DC voltageand a. further DC voltage proportional to any constant term forming part of the function f(x)- and for generating a summary voltage proportional to said functional value f(x,).

The invention will be described more specifically hereinafter with reference to theaccompanying drawings, in which:

FIG. I is a block diagram of a system according to a first embodiment of the invention in which the functional voltage is built up as a sum of Legendre-polynoms, or derivatives of such polynoms, respectively;

FIG. 2 illustrates a plurality of voltage-to-time curves pertaining to the system of FIG. 1;

FIG. 3 is a block diagram of a system according to a second embodiment of the invention, in which the functional voltage is in the form of a stepped function, and

FIG. 4a and 4b illustrate a plurality of voltage-to-time curves pertaining to the system of FIG. 3.

In FIG. 1, numeral 1 designates a DC voltage source emitting a constant or accurately adjustable DC voltage u, which is supplied to the input of an electronic switch 2 operating as a polarity reverser controlled by a control signal u,. Control signal u, is a square wave voltage having the frequency f, and causing the output signal of the switch 2 to change its polarity each time the control signal changes its sign, i.e. twice during each period. The switch 2 emits an output signal u' which is a square wave voltage having an amplitude corresponding to the magnitude of the DC voltage u, from the voltage source 1 and is supplied to the input of an integrating circuit 3, the output signal u of which is supplied to a second v electronic switch 4 which, similarly to switch 2, is controlled by the voltage u,. The output signal 14, from switch 4 is supplied to an amplifier 5 which is in turn feeding an integrating circuit 6 with its output connected to the input of a third electronic switch 7. The output signal u of switch 7 is supplied to an amplifier 8 feeding the amplified signal to one input of an adding circuit 9 the second input of which is receiving the out- 7 put voltage 14' from the first switch 2. The adder 9 applies its summary signal u';,,, to an integrating circuit 10 applying its output voltage u to a fourth electronic switch 11, which in turn is feeding an amplifier 12 with its output connected to one input of a further adding circuit 13. Adder 13 has a second input to which an output signal u from the amplifier 5 is applied and emits at its output a summary voltage u',,. The two electronic switches 7 and 11, similarly to switches 2 and 4, are controlled by the control signal u, and serve as polarity reversers.

Numerals l4, l5, 16, I7 and I8 designate five potentiometers serving as adjustable voltage dividers, of which those designated 14 and 15 are fed with the DC voltage 14,, while potentiometers l6 and 18 are fed with the output voltage u from amplifier 5 and the output voltage u'., from adder 13 respectively, and the potentiometer 17 is fed with the output voltage u; from an electronic switch 19 being supplied with the output voltage u from adder 9. Potentiometers 15, 16, 17 and I8 apply part of the supply voltage, as determined by their respective tap settings, to corresponding inputs of an adding circuit 20, while the potentiometer I4 applies part of the DC voltage 14,, determined by its set value to an adding circuit 21.

The control voltage u, for switches 2, 4, 7,- I1 and 19 is generated by a square wave generator 22, which also feeds a pulse generator 23. This pulse generator emits a pulse duration modulated signal, which is supplied as control signal to an electronic gate 24, having an input connected to the output of the adder 20 and an output emitting a signal which is time-duration modulated in accordance with the control signal and has an amplitude equal to that of the summary signal derived from adder 20. The output signal of the gate circuit 24 is supplied to an averaging circuit 25 which applies its output signal to a second input of the adder 21. The output signal of the system is applied to a terminal 26 connected to the output of adder 21.

The mode of operation of the system thus described will be explained more in detail hereinafter, reference being made to FIG. 2which illustrates several voltage-to-time curves.

As mentioned above in the system of FIG. 1, the voltage representing the derivative of the function is built up as a sum of Legendre-polynoms, or derivatives of such polynoms.

Any arbitrary continuous function f(x) may be expressed as a sum of Legendre-polynoms according to the equation:

where 0,, 0,, a a,, etc. are constants dependent of the function f(x), while P,,(x), P,(x), P,(x), etc. represent Legendrepolynoms of successively increasing order according to the general expression:

Since the terms in the above-defined expression for f(x) converge rapidly towards zero, a good approximation of f(x) usually will be obtained already after evaluating three or four terms of said expression. The number of terms to be evaluated will naturally be determined by the desired accuracy of approximation.

The derivative of a Legendre-polynom P,,(x), i.e. a polynom of the mth degree, may be expressed according to the equation:

The system shown in FIG. 1 is based on the principle of adding periodical voltages corresponding to Legendre-polynoms of successively increasing order as to form a pulse-duration modulated voltage, periodically representing the function df(.r)/within the interval w stes-1: and deriving from this voltage, by averaging over the interval) x gr, a DC voltage proportional to the value fix of the function flx) corresponding to the value .r, of the independent variable quantityx.

The system of FIG. 1 is supplied with an accurately determined DC voltage u which represents P,,(.\') in the abovedefined expression for flx). The voltage 14,, also corresponds to the derivative dP,(.\')/dx. To produce a periodical electrical signal representing the various Legendre-polynoms, or their derivatives, respectively, within a selected interval x,, 3x 3x it is necessary to transfer the independent variable x to a time scale. This is effected in the system shown by causing the polarity of the voltage u to change by means of the switch 2, which is affected by the square wave voltage 14,, generated by generator 22, at the frequency of the control voltage u,,. Thus, at the output of this switch 2, a square wave voltage u' v will be obtained, which is in synchronism with the control voltage u, and represents the derivative dP,(x)/d.r with one sign during the positive half-cycles and opposite sign during the negative half-cycles of the control voltage 14,. The integration of the voltage 14' in integrator 3 will give rise to a voltage u representing a first-degree polynom P,(.r). However, this voltage too, has opposite sign during the negative half-cycles of the control voltage 14,.

An output voltage 14 is generated by further polarity reversals in a subsequent switch 4, said voltage representing P,(.r) with its correct sign during both positive and negative half-cycles of the control voltage u,. It is seen from the equation 'f sPrtx) that a voltage representing the derivative of the second-degree polynom P (.r) can be obtained by multiplying the voltage u with the factor 3. For this reason, amplifier has been given the amplification factor 3, whereby its output voltage u will represent the last-mentioned derivative. The voltage u' is integrated by integrator 6 which emits a voltage u corresponding to the polynom P This voltage is subject to polarity reversal for every second half-cycle of the control voltage u, in a switch 7, the output signal of which consequently is designated 14 The amplifier 8.after switch 7 has the-amplification factor 5. By adding the output voltage Su and the voltage u',,- in the adder 9 a voltage u' will be derived, which represents the third-degree derivative dP (.r)/d.r, though with opposite sign, during the negative half-cycles of the control voltage u,.

Integrator 10 generates the voltage u from which, by polarity reversal in switch 11, a voltage a is derived representing the polynom P (.r) with its correct sign. After amplification in amplifier 12 by the factor 7, this voltage is fed to the adder 13 the resulting output signal of which is a voltage equal to the sum of voltages 714;, and u This summary voltage represents the derivative dP,,(.r)/d.\'.

Before adding the voltages corresponding to the derivatives of the polynoms P,(.r), P (x), P (x) and P (.r) to each other to form a periodical voltage representing the function derivative dflx)/, they will have to be weighted in respect of the constants a a a and a, forming part of the expression for the function f(.r). This is effected by means of the potentiometers l5, l6, l7 and 18 which are fed with the voltages u, (=u',), u' u (via switch 19) and u,, respectively. The adder 20 is supplied with said voltages multiplied by the factors k,, k k and k respectively, as determined by the set values of the various potentiometers and the adder emits an output voltage of the form:

This voltage u is fed to the set input of the gate circuit 24 the control input of which is supplied with a pulse-duration modulated control signal u, constituted by pulses of a duration determined by the set value of pulse generator 23 and having a frequency 2f (corresponding to double the frequency of control voltage u,). The duration of said pulses is adjusted to correspond to the value of X of the independent variable x for which the magnitude of the function flx) is to be determined. This means that the pulse duration r,, could be expressed as:

where T=l/2f, the period of voltages u, and u.

The output signal of gate circuit 24 is a voltage u',, comprised by a series of pulses of the duration t,, and repetition frequency 2]; (=l/T). Said pulses, which occur during a time interval1,,+nT515t,,+r,,+nTeorresponding to the interval as $9; 39: are forming separated parts of the periodical voltage u. The voltage 14, is fed to the input of the averaging circuit 25, which emits a DC voltage u constituting the mean value of the voltage u',. The voltage u which is represented by the equation:

will in this case be proportional to the expression f(x)a,,P,, (x). To derive a voltage which is directly proportional to the value fin) of the function f(x) for x=x,, a further DC voltage k u representing a,,P,,(.r), is added to the voltage in the adder 21, whereby the output voltage 14,, of the system emitted at terminal 26 will have the form:

In the system illustrated in FIG. 3, the periodical voltage u, representing the derivative of the function f(.r) is built up as a stepped function instead of a summary of Legendre-polynoms.

The stepped functional voltage 14', graphically represented in FIG. 4 is generated by means of a cyclically operating counter 30, triggered by a clock-pulse generator 29, which in the embodiment here illustrated, emits l0 cyclical pulse trains p p p p each being fed to a weighting unit 31. 32, 33 40, respectively and constituted by potentiometers in which the pulses are multiplied by adjustable weighting factors k,, k "k respectively. The pulse voltages thus derived are supplied to an adder which emits an output signal in the form of a stepped function voltage:

u'=k,'p +k 'p "k -p This voltage is further processed in the system of FIG. 3 in the same way as the output voltage from adder 20 in the system of FIG. 1.

The potentiometers 14 to 18 of FIG. 1 and 14, 31 to 40 of FIG. 3 respectively, can either be supplemented by polarity changeovers or be connected to positive and negative inputs of the adders 20 and 21, respectively. to enable multiplying by weighting factors of arbitrary sign.

The invention is of course not limited to the two embodiments as described hereinbefore. ln particular, it should be mentioned that the voltage u corresponding to the derivative dflxflcould be generated in other ways than those described, for instance, said voltage could be built up by sinusoidal functions.

What I claim is: g H

I. A method of generating an electrical signal representing a value fix of a function flx) of an independent variable x, which corresponds to an arbitrary value x, of said independent variable x. characterized by the following steps:

generating an electrical signal with a period representing the variations in the derivative dflx)/dx of the function within an interval $2: flx including the value x deriving from said electrical signal a pulse-duration modulated signal consisting of pulses with a duration of Inf-13 ix a and a frequency of l /T, said pulsesindicating the variations in the derivative dflx)/d.r within the interval :1; $31

deriving from said pulse-duration modulated signal a DC voltage proportional to the mean valve thereof, and adding to this voltage a further DC voltage of a magnitude corresponding to any constant term forming part of the function f(x).

2. The method according to claim 1, characterized by building up the periodical electrical signal as a sum of Legendrepolynoms, or derivatives of such polynoms, respectively.

3. The method according to claim 1, characterized by building up the periodical electrical signal as a stepwise varying function.

4. The method according to claim 1. characterized by building up the periodical electrical signal from sinusoidal functions.

5. In an apparatus for generating an electrical signal representing a value f(.\ of a function f(.r) of an independent variable x, which corresponds to an arbitrary value .r, of said independent variable x, the improvement comprising:

generating means to generate a periodical electrical signal representative of the derivative of a certain function flx) within a selected interval m s a: x

gate means to derive from said signal a periodical pulse-duration modulated signal representative of the derivative dflx)/within the interval 1 where 15 5 an averaging circuit emitting a DC voltage proportional to the mean value of the pulse-duration modulated signal; signal means providing a signal representative of a constant term forming a part of the function flx);

an adding circuit for adding said representative signal and said DC voltage and producing an output voltage proportional to said functional value fix 

1. A method of generating an electrical signal representing a value f(x1) of a function f(x) of an independent variable x, which corresponds to an arbitrary value x1 of said independent variable x, characterized by the following steps: generating an electrical signal with a period representing the variations in the derivative df(x)/dx of the function within an interval xa x xb including the value x1; deriving from said electrical signal a pulse-duration modulated signal consisting of pulses with a duration of and a frequency of 1/T, said pulses indicating the variations in the derivative df(x)/dx within the interval xa x x1; deriving from said pulse-duration modulated signal a DC voltage proportional to the mean valve thereof, and adding to this voltage a further DC voltage of a magnitude corresponding to any constant term forming part of the function f(x).
 2. The method according to claim 1, characterized by building up the periodical electrical signal as a sum of Legendre-polynoms, or derivatives of such polynoms, respectively.
 3. The method according to claim 1, characterized by building up the periodical electrical signal as a stepwise varying function.
 4. The method according t claim 1, characterized by building up the periodical electrical signal from sinusoidal functions.
 5. In an apparatus for generating an electrical signal representing a value f(x1) of a function f(x) of an independent variable x, which corresponds to an arbitrary value x1 of said independent variable x, the improvement comprising: generating means to generate a periodical electrical signal representative of the derivative of a certain function f(x) within a selected interval xa x xb; gate means to derive from said signal a periodical pulse-duration modulated signal representative of the derivative df(x)/dx within the interval xa x x1 where x1 xb; an averaging circuit emitting a DC voltage proportional to the mean value of the pulse-duration modulated signal; signal means providing a signal representative of a constant term forming a part of the function f(x); an adding circuit for adding said representative signal and said DC voltage and producing an output voltage proportional to said functional value f(x1). 